<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-JAVA: 首页</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-JAVA
   </div>
   <div id="projectbrief">AWTK JAVA API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="PageDoc"><div class="header">
  <div class="headertitle">
<div class="title">AWTK-JAVA 文档</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p><a href="https://github.com/zlgopen/awtk">AWTK</a> 全称 Toolkit AnyWhere，是 <a href="http://www.zlg.cn/">ZLG</a> 开发的开源 GUI 引擎，旨在为嵌入式系统、WEB、各种小程序、手机和 PC 打造的通用 GUI 引擎，为用户提供一个功能强大、高效可靠、简单易用、可轻松做出炫酷效果的 GUI 引擎。</p>
<blockquote class="doxtable">
<p>欢迎广大开发者一起参与开发：生态共建计划。 </p>
</blockquote>
<h4><a href="https://github.com/zlgopen/awtk">AWTK</a> 寓意有两个方面：</h4>
<ul>
<li>Toolkit AnyWhere。</li>
<li>ZLG 物联网操作系统 AWorks 内置 GUI。</li>
</ul>
<h2>JAVA 示例代码</h2>
<div class="fragment"><div class="line"><span class="keyword">import</span> awtk.*;</div>
<div class="line"> </div>
<div class="line"><span class="keyword">class </span>DemoButton {</div>
<div class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">void</span> main(String[] args) {</div>
<div class="line">   AWTK.init(320, 480, AppType.SIMULATOR);</div>
<div class="line"> </div>
<div class="line">   Widget win = Window.create(<span class="keyword">null</span>, 0, 0, 0, 0);</div>
<div class="line">   Widget button = Button.create(win, 10, 0, 0, 0);</div>
<div class="line">   </div>
<div class="line">   button.setName(<span class="stringliteral">&quot;OK&quot;</span>);</div>
<div class="line">   button.setText(<span class="stringliteral">&quot;OK&quot;</span>);</div>
<div class="line">   button.setSelfLayout(<span class="stringliteral">&quot;default(x=c,y=m,w=200,h=40)&quot;</span>);</div>
<div class="line">   button.on(EventType.CLICK, <span class="keyword">new</span> PrintOnClicked(), 0);</div>
<div class="line"> </div>
<div class="line">   AWTK.run();</div>
<div class="line"> }</div>
<div class="line"> </div>
<div class="line"> <span class="keyword">static</span> {</div>
<div class="line">   System.loadLibrary(<span class="stringliteral">&quot;awtk-jni&quot;</span>);</div>
<div class="line"> }</div>
<div class="line">}</div>
</div><!-- fragment --><p><a href="classes.html">类列表</a> </p>
</div></div><!-- PageDoc -->
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
